package com.fs.jzzn.pojo;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import com.fs.base.param.SysConstant;
import com.fs.base.pojo.PkEntity;

/**
 * @author TiddlerCJ
 */
@Entity
@Table(name="p_flow_process")
@NoArgsConstructor
@Data@EqualsAndHashCode(callSuper=false)
public class FlowProcess extends PkEntity{
	private String flowStatusId;	//当前流程状态记录主键
	private String modleId;	  		//业务实体模型对应表主键
	private String nodeId;			//当前流程节点id
	private String nodeName;	//当前流程节点Name
	private String nodeUserId;	//处理人
	private String msg;				//处理建议
	
	@Transient
	public String nodeUserName;
	
	public String getNodeUserName() {
		return SysConstant.USERS_ID_NAME_MAP.get(this.getNodeUserId());
	}
	
	public FlowProcess( String flowStatusId,String modleId,String nodeId,String nodeName,String nodeUserId,String msg){
		this.flowStatusId = flowStatusId;
		this.modleId = modleId;
		this.nodeId =nodeId;
		this.nodeName = nodeName;
		this.nodeUserId = nodeUserId;
		this.msg = msg;
	}
}
